Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
interface System.​Collections.​Generic.​IDictionary<​TKey, TValue>
Assembly: System.Runtime
Implemented Interfaces
- ICollection`1 (Inherits: IEnumerable<​KeyValuePair<​TKey, TValue>>IEnumerable)
Represents a generic collection of key/value pairs.
Properties
TValue
Item
ICollection<​TKey>
Keys
Gets an <see cref="T:System.Collections.Generic.ICollection`1" /> containing the keys of the <see cref="T:System.Collections.Generic.IDictionary`2" /> .
ICollection<​TValue>
Values
Gets an <see cref="T:System.Collections.Generic.ICollection`1" /> containing the values in the <see cref="T:System.Collections.Generic.IDictionary`2" /> .
Methods
void
Add​(TKey key,
TValue value)
Adds an element with the provided key and value to the <see cref="T:System.Collections.Generic.IDictionary`2" /> .
key
The object to use as the key of the element to add.
value
The object to use as the value of the element to add.
bool
ContainsKey​(TKey key)
Determines whether the <see cref="T:System.Collections.Generic.IDictionary`2" /> contains an element with the specified key.
Returns <see langword="true" /> if the <see cref="T:System.Collections.Generic.IDictionary`2" /> contains an element with the key; otherwise, <see langword="false" /> .
key
The key to locate in the <see cref="T:System.Collections.Generic.IDictionary`2" /> .
bool
Remove​(TKey key)
Removes the element with the specified key from the <see cref="T:System.Collections.Generic.IDictionary`2" /> .
Returns <see langword="true" /> if the element is successfully removed; otherwise, <see langword="false" /> . This method also returns <see langword="false" /> if <paramref name="key" /> was not found in the original <see cref="T:System.Collections.Generic.IDictionary`2" /> .
key
The key of the element to remove.